home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util4
/
0utils.lha
/
0Utils
/
Yes.data
< prev
next >
Wrap
Text File
|
1995-08-19
|
1KB
|
67 lines
#ifdef TPLTER
Yes = {
version = "1.1";
short = {{ Output 'y' lines }};
description = {{
Output an nearly endless stream of 'y' lines
(actually 2^32-1).
The output string can bve changed w/ the
STRING parameter; please note, that for
that case, Yes does _not_ add newlines
itself, so the string must itself contain
a newline.
The number of output lines can be varied w/
the LINES parameter.
RESULT
what can we call a result here?
}};
examples = {{
>Yes LINES=5
y
y
y
y
y
}};
history = {{
05-04-95 b_noll (1.0) created
12-04-95 b_noll source modification
19-08-95 b_noll created .data file
19-08-95 b_noll (1.1) removed '*n' neccessity, changed args precedence
}};
template = "LINES/N,STRING,NONL/S";
args = {{
ULONG *lines;
STRPTR string;
ULONG noNL;
}};
body = {{
{
STRPTR string;
ULONG count;
retval = RETURN_OK;
string = argv->string ? argv->string : "y";
count = argv->lines ? *argv->lines : ~0;
while (!CheckSignal(SIGBREAKF_CTRL_C) && count--) {
if ((PutStr(string) || (!argv->noNL && PutStr("\n"))) != 0) {
retval = 10;
break;
} /* if */
} /* while */
}
}};
};
#endif